//:C04:0string.cpp {RunByHand}
// Illustrates ostringstream
#include <iostream>
#include <sstream>
#include <string>
using namespace std;
int main(void) {
  cout << "type an int, a float and a string: ";
  int i;
  float f;
  cin >> i >> f;
  cin >> ws;   // Thrwo away white space
  string stuff;
  getline(cin, stuff);    // Get rest of the line
  ostringstream os;
  os << "integer = " << i << endl;
  os << "float = " << f << endl;
  os << "string = " << stuff << endl;
  string result = os.str();
  cout << result << endl;
} 